<?php
use yii\helpers\Html;
use yii\helpers\Url;
use app\lib\WeixinUtils;

/* @var $this yii\web\View */
/* @var $content string 字符串 */


$web = Url::to("@web");
//echo json_encode($x_data);
//exit;
?>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>我的分销</title>
    <link href="<?=$web?>/css/fx/my_account.css" rel="stylesheet" type="text/css">
    <link href="<?=$web?>/css/fx/global.css" rel="stylesheet" type="text/css">
    <script src="<?=$web?>/js/jquery.js"></script>
    <script src="<?=$web?>/js/echarts.min.js"></script>
    <script>
        $(function ($) {
            var w = $(document).width();
            if (w > 640) {
                w = 640;

            }
            $("html").css("font-size", w * 20 / 320);
            // 基于准备好的dom，初始化echarts实例
            var myChart = echarts.init($('.body_center_chart').get(0));
            // 使用刚指定的配置项和数据显示图表。
            myChart.setOption(option);
        });






        var option = {
            grid:{
                left:30,
                top:20,
                bottom:30,
                right:20
            },

            xAxis : [
                {
                    type : 'category',
                    boundaryGap : false,
                    data : <?=json_encode($x_data)?>
                    ,axisLine:{  show:false}
                    ,  axisTick:{  show:false}
                }
            ],
            yAxis : [
                {
                    type : 'value',
                    axisLabel : {
                       show:false
                    },
                    axisTick:{  show:false}
                    ,axisLine:{  show:false}

                }
            ],
            series : [
                {
                    name:'最高气温',
                    type:'line',
                    data:<?=json_encode($y_data)?>,
                    label:{
                        normal:{show:true}
                    }

                }

            ]
        };

        getCash=function(){

                window.location.href = "<?=Url::to(["wx-fx/get-cash"]);?>" ;
        };
        myTeam=function(){

            window.location.href = "<?=Url::to(["wx-fx/my-team"]);?>" ;
        };
        myResultList=function(){

            window.location.href = "<?=Url::to(["wx-fx/my-result-list"]);?>" ;
        };
        myBalanceList=function(){

            window.location.href = "<?=Url::to(["wx-fx/my-balance-list"]);?>" ;
        };
    </script>
</head>
<body>




<div class="head">
    <div class="head_title">
        <div class="head_title_words">
            <span>账户余额(元)</span>
        </div>
        <div class="head_title_icon">
            <span>?</span>
        </div>
    </div>
    <div class="head_money" onclick="myBalanceList();">
        <span><?=number_format($user_info['CASH_ACCOUNT'],2)?></span>
    </div>
    <div class="summary">
        <div class="summary_money" onclick="myResultList();">
            <span><?=number_format($user_info['BUY_RESULT'],2)?></span>
        </div>
        <div class="summary_radius">
            <span>总业绩(元)</span>
        </div>
    </div>
</div>
<div class="body">
    <div class="body_top">
        <div class="body_top_left">
            <div class="body_top_words">
                <span>分享值</span>
            </div>
            <div class="body_top_percentage">
                <span><?=$user_info['ENJOY'] * 100?>%</span>
            </div>
        </div>
        <div class="body_top_right">
            <div class="body_top_words">
                <span>折扣率</span>
            </div>
            <div class="body_top_percentage">
                <span><?=$user_info['DISCOUNT'] * 100?>%</span>
            </div>
        </div>
    </div>
    <div class="body_center">
        <div class="body_center_top">
            <div class="body_center_left">
                <span>团队贡献收益</span>
            </div>
            <div class="body_center_right" onclick="myTeam();">
                <span>我的团队</span>
            </div>
        </div>
        <div class="body_center_chart">
<!--            <img src="--><?//=$web?><!--/img/fx/account_1.png" style="width: 100%">-->
        </div>
    </div>
    <div class="body_foot" onclick="getCash();">
        <span >提现</span>
    </div>
</div>
</body>
</html>